<template>
	<view class="flex-center" style="padding: 16rpx 20rpx 16rpx 28rpx; height: 66rpx;border-radius: 44rpx;border: 2rpx solid #E9E9E9;">
		<image src="@/static/image/index/notice_icon.png" style="width: 24rpx; height: 28rpx;"></image>
		<view class="u-p-l-14" style="width: 100%;">
			<swiper
			:style="{ height: parseFloat(height) + 'rpx', width: '100%' }"
			vertical
			:indicator-dots="false"
			autoplay
			circular
			>
				<swiper-item v-for="(item, index) in list" :key="index"
					class="flex-center-between">
					<view style="width: 100%" class="linecamp-1" @click="jumpUrl(`/pages/other/richText/richText?type=notice&noticeId=${ item.noticeId }`)">
						{{ textKey && item[textKey] || item }}
					</view>
				</swiper-item>
			</swiper>
		</view>
		<view class="flex-center" @click="jumpUrl('/pages/common/message/notice')">
			<view class="nowrap color-grew">{{ lang_message.notice }}</view>
			<u-icon name="right" custom-prefix="u" size="20" color="#999"></u-icon>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			height: {
				default: 50
			},
			// 如果指定文本key，则只会获取key的文本，否则获取对象
			textKey: {
				default: ''
			},
			list: {
				default: () => ([])
			}
		},
		data() {
			return {
				
			}
		}
	}
</script>

<style>
</style>
